package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Region;
import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * 攻略持久化接口
 */
public interface StrategyRepository extends MongoRepository<Strategy, String>{

    /**
     * 通过id查询明细
     * @param id
     */
    List<Strategy> findByCatalogId(String id);

    /**
     *通过分组拿到前三的信息
     * @param destId
     * @param viewnum
     * @return
     */
    List<Strategy> findByDestId(String destId, PageRequest viewnum);
}
